package cn.lili.modules.member.entity.dos;

import cn.hutool.core.date.DateTime;
import cn.lili.common.utils.BeanUtil;
import cn.lili.common.utils.SnowFlake;
import cn.lili.modules.member.entity.dto.UnionAddDTO;
import cn.lili.modules.member.entity.dto.UnionNoticeAddDTO;
import cn.lili.mybatis.model.BaseSceneEntity;
import cn.lili.mybatis.model.BaseStandardEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

@EqualsAndHashCode(callSuper = true)
@Data
@TableName("li_union_notice")
@ApiModel(value = "工会公告")
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
public class UnionNotice extends BaseStandardEntity implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "公告内容")
    private String content;
    @ApiModelProperty(value = "工会ID")
    private String unionId;
    @ApiModelProperty(value = "发布时间")
    private Date pubtime;

    public UnionNotice(UnionNoticeAddDTO unionNoticeDTO) {
        BeanUtil.copyProperties(unionNoticeDTO, this);
        this.setId(SnowFlake.getIdStr());
    }
}
